package com.sumainfor.pc.market.fallback;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sumainfor.common.exception.TCException;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.feign.TenantFeign;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author Eddy·Chen
 * @Email 835033913@qq.com
 * @Create 2019-02-26 18:57
 */
@Component
public class TenantFeignFallback implements TenantFeign {
    @Override
    public JsonResult getWxInfoByTenId(String tenId) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public JsonResult updateWxInfoByTenId(Map<String, Object> params) {
        return JsonResult.error("服务器繁忙...");
    }

    @Override
    public Page<Map<String, Object>> selectTenantTableList(Map<String, Object> params) {
        throw new TCException("租客端服务繁忙..");
    }

    @Override
    public JsonResult getTenantByPhone(String phone) {
        return JsonResult.success("租客端服务繁忙..");
    }

    @Override
    public JsonResult getTenantList() {
        return JsonResult.error("租客端服务繁忙..");
    }

    @Override
    public List<Map<String, Object>> getTenNameandPhone(Map<String, Object> params) {
        return new ArrayList<>();
    }
}
